package xyz.zhzby.cyzx.com.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import xyz.zhzby.cyzx.servicebase.domain.DataLogInfo;

import java.io.Serializable;

/**
 * <p>
 * 评论/回复
 * </p>
 *
 * @author zby
 * @since 2022-02-15
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("com_discussion")
@ApiModel(value="Discussion对象", description="评论/回复")
public class Discussion extends DataLogInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private Long id;

    @ApiModelProperty(value = "所属博客或试题的ID/父评论ID")
    @TableField("parent_id")
    private Long parentId;

    @ApiModelProperty(value = "评论者ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "评论者昵称")
    @TableField("user_nickname")
    private String userNickname;

    @ApiModelProperty(value = "评论者头像")
    @TableField("user_avatar")
    private String userAvatar;

    @ApiModelProperty(value = "被回复者ID")
    @TableField("reply_to_user_id")
    private Long replyToUserId;

    @ApiModelProperty(value = "被回复者昵称")
    @TableField("reply_to_user_nickname")
    private String replyToUserNickname;

    @ApiModelProperty(value = "评论内容")
    @TableField("content")
    private String content;

}
